package com.cz.run.beans.mysql;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author CAIYJ
 * @since 2018-06-10
 */
public class Product extends Model<Product> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 商品名称
     */
    private String name;
    /**
     * 商品型号
     */
    private String marque;
    /**
     * 仓库条码 
     */
    private String barcode;
    /**
     * 商品价格
     */
    private BigDecimal price;
    /**
     * 市场价格
     */
    @TableField("market_price")
    private BigDecimal marketPrice;
    /**
     * 成本价格
     */
    @TableField("cost_price")
    private BigDecimal costPrice;
    /**
     * 库存量
     */
    private Integer stock;
    /**
     * 警告库存
     */
    @TableField("warning_stock")
    private Integer warningStock;
    private Double integral;
    /**
     * 商品图片
     */
    @TableField("picture_url")
    private String pictureUrl;
    /**
     * 商品详情
     */
    private String content;
    /**
     * 产品列表ID
     */
    @TableField("product_category_id")
    private Integer productCategoryId;
    /**
     * 1:上架商品；2：抽奖商品
     */
    private Integer type;
    /**
     * 0：预售；1：下架；2：上家
     */
    private Integer status;
    /**
     * 开奖时间
     */
    @TableField("open_time")
    private Date openTime;
    @TableField("create_time")
    private Date createTime;
    @TableField("update_time")
    private Date updateTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMarque() {
        return marque;
    }

    public void setMarque(String marque) {
        this.marque = marque;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getMarketPrice() {
        return marketPrice;
    }

    public void setMarketPrice(BigDecimal marketPrice) {
        this.marketPrice = marketPrice;
    }

    public BigDecimal getCostPrice() {
        return costPrice;
    }

    public void setCostPrice(BigDecimal costPrice) {
        this.costPrice = costPrice;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public Integer getWarningStock() {
        return warningStock;
    }

    public void setWarningStock(Integer warningStock) {
        this.warningStock = warningStock;
    }

    public Double getIntegral() {
        return integral;
    }

    public void setIntegral(Double integral) {
        this.integral = integral;
    }

    public String getPictureUrl() {
        return pictureUrl;
    }

    public void setPictureUrl(String pictureUrl) {
        this.pictureUrl = pictureUrl;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getProductCategoryId() {
        return productCategoryId;
    }

    public void setProductCategoryId(Integer productCategoryId) {
        this.productCategoryId = productCategoryId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getOpenTime() {
        return openTime;
    }

    public void setOpenTime(Date openTime) {
        this.openTime = openTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Product{" +
        ", id=" + id +
        ", name=" + name +
        ", marque=" + marque +
        ", barcode=" + barcode +
        ", price=" + price +
        ", marketPrice=" + marketPrice +
        ", costPrice=" + costPrice +
        ", stock=" + stock +
        ", warningStock=" + warningStock +
        ", integral=" + integral +
        ", pictureUrl=" + pictureUrl +
        ", content=" + content +
        ", productCategoryId=" + productCategoryId +
        ", type=" + type +
        ", status=" + status +
        ", openTime=" + openTime +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
